
const {User} = require("../model/model.js");

const UserDao = {
    save (userinfo){
       const user = new User(userinfo);
    return user.save();
    },
    find(condition){
        return User.find(condition);
    },
    update(condition,passwordinfo){
        return User.update({username:condition},{password:passwordinfo});
    }
}
module.exports = UserDao;